←Select platform

ReplaceIntersectedCharacters(IEnumerable<LeadRect>,char,int) Method

Summary

Replaces the characters intersecting with the specified rectangles at the specified percentage.

Syntax
C#
VB
C++
public bool ReplaceIntersectedCharacters( 
   IEnumerable<LeadRect> bounds, 
   char replaceCharacter, 
   int intersectionPercentage 
) 
Public Function ReplaceIntersectedCharacters( 
   ByVal bounds As IEnumerable(Of LeadRect 
), 
   ByVal replaceCharacter As Char, 
   ByVal intersectionPercentage As Integer) As Boolean 
public:  
   bool ReplaceIntersectedCharacters( 
      IEnumerable<LeadRect^>^ bounds, 
      Char replaceCharacter, 
      Int32 intersectionPercentage 
   ) 

Parameters

bounds

List of rectangles containing the bounds to check. These values are in pixels.

replaceCharacter

The new character code to use. Use 0 to delete the characters.

intersectionPercentage

Intersection percentage between each character and bounds.

Return Value

true if one or more characters were replaced; otherwise, false.

Remarks

This is a helper method used to quickly perform actions such as redacting or removing characters from the recognition data based on their locations.

intersectionPercentage can be used to control the percentage of intersection on which to perform the operation as follows:

  • Value of 1: Means only perform the operation if 1% or more of the character boundary intersects with any of the items in bounds.
  • Value of 50: Means only perform the operation if 50% or more of the character boundary intersects with any of the items in bounds.
  • Value of 100: Means only perform the operation if 100% of the character boundary intersects with any of the items in bounds.

intersectionPercentage value of 0 means use the default percentage of 50%.

Example

For an example, refer to ReplaceIntersectedCharacters.

Requirements

Target Platforms

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Ocr Assembly